/*
* Poppy Game Engine - https://pgetemplate.googlecode.com/svn/
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
*
* Copyright (c) 2008 Poppy
*/

#pragma once

#include "SystemExportSymbol.h"
#include "SystemDefines.h"
#include "CMemObject.h"
#include "FileLib.h"

namespace PGESystem
{

	class PGESYSTEM_API CBinaryStream : virtual public CMemObject
	{
	public:

		inline virtual void Seek(int pos, PGE_WHENCE whence);

		inline virtual int  GetPosition();

		virtual int GetLength() = 0;

		virtual int BinaryRead(void * buffer, unsigned int size) = 0;

		virtual int BinaryWrite(void * buffer, unsigned int size) = 0;

		virtual int Read(char * buffer) = 0;

		virtual int Write(char * buffer) = 0;

		virtual ~CBinaryStream() {}

	protected:

		CBinaryStream() : m_dFilePointer(0) {}
		
		int m_dFilePointer;

	};

	#include "CBinaryStream.inl"

}
